const app = getApp();
Component({
    properties: {
        flagIndex: {
            type: Number,
            value: 1,
        },
        hasMarket: { // 属性名
            type: Boolean,
            value: true
        },
    },

    data: {

    },

    methods: {
        btnScan() {
            wx.scanCode({
                success(res) {
                    //保留当前页跳转
                    wx.navigateTo({
                        url: "/pages/guide/guide?q=" + res.result,
                    })
                }
            })
        },
        toPage(e){
            const {page,id} = e.currentTarget.dataset;
            if(id && id==this.properties.flagIndex) return;
            wx.reLaunch({url: page})
        }
    }
})